{extend name="layout/base" /}
{block name="main"}
<article class="main__content content">
    <h4>留言列表</h4>
    <table class="table">
        <thead class="table__head">
        <tr>
            <th>ID</th>
            <th>用户名</th>
            <th>姓名</th>
            <th>内容</th>
            <th>创建时间</th>
            <th>回复内容</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody class="table__body">
        {foreach $contactList as $contact}
        <tr>
            <td>{$contact.id}</td>
            <td>{$contact.username}</td>
            <td>{$contact.name}</td>
            <td>{$contact.content}</td>
            <td>{$contact.create_time ?? ''}</td>
            <td>{$contact.reply}</td>
            <td>
                <div class="tpl-table-black-operation">
                    <a href="{:url('edit')}?id={$contact.id}">
                        <i class="am-icon-pencil"></i> 编辑
                    </a>
                    <a href="{:url('delete')}?id={$contact.id}"
                       class="tpl-table-black-operation-del">
                        <i class="am-icon-trash"></i> 删除
                    </a>
                </div>
            </td>
        </tr>
        {/foreach}
        </tbody>
    </table>
</article>
{/block}
